<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
   <form>
   	<input type="text" name="name" />
   </form>
   <button>登录</button>
   
   <a href="http://127.0.0.1:8082/luntan/DownloadServlet">下载文件</a>
   
   <script src="js/jquery-3.1.1.min.js" type="text/javascript" charset="utf-8"></script>
   <script>
   	window.onload=function(){
   		$("button").click(function(){
   			$.ajax({
   				type:"post",
   				url:"LoginServlet",
   				async:true,
   				data:$("form").serialize(),
   				success:function(){
   					window.location.href="index.html";
   				}
   			});
   		})
   	}
   </script>
</body>
</html>